package com.zhao.fishingguideserver.POJO;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.time.LocalDateTime;

/**
 * 管理员用户实体类
 */
@Data
public class AdminUser {
    private Long adminId;

    @NotEmpty
    @Pattern(regexp = "^.{5,16}$", message = "用户名长度必须在5-16位之间")
    private String username;

    @JsonIgnore
    @Pattern(regexp = "^.{5,16}$", message = "密码长度必须在5-16位之间")
    private String password;

    private String nickName;
    
    /**
     * 角色：super_admin-超级管理员，admin-普通管理员
     */
    private String role;
    
    /**
     * 状态：1-启用，0-禁用
     */
    private Integer status;
    
    private LocalDateTime createdAt;
    
    private LocalDateTime updatedAt;
}

